const CourseLayoutTopMenu = () => import(/* webpackChunkName: "CourseIndex" */ 'pages/users/layout')
const ManagerIndex = () => import(/* webpackChunkName: "UsersIndex" */ 'pages/users/manager')
const EditManager = () => import(/* webpackChunkName: "EditUser" */ 'pages/users/manager/edit')
const StaffIndex = () => import(/* webpackChunkName: "UsersIndex" */ 'pages/users/staff')
const EditStaff = () => import(/* webpackChunkName: "EditUser" */ 'pages/users/staff/edit')
const ImportStaff = () => import(/* webpackChunkName: "EditUser" */ 'pages/users/staff/import')

export default [
  {
    path: '/users',
    component: CourseLayoutTopMenu,
    children: [
      {
        path: '/users/manager',
        name: 'users.manager.index',
        component: ManagerIndex,
        meta: {
          title: '管理员账号',
          menuPath: '/users/staff',
          keepAlive: true,
          auth: false,
          notBreadCrumb: true
        }
      },
      {
        path: '/users/staff',
        name: 'users.staff.index',
        component: StaffIndex,
        meta: {
          title: '人员账号',
          menuPath: '/users/staff',
          keepAlive: true,
          auth: false,
          notBreadCrumb: true
        }
      },
    ]
  },

  {
    path: '/users/manager/add',
    name: 'users.manager.add',
    component: EditManager,
    meta: {
      title: '新增',
      menuPath: '/users/staff',
      notMatchedMenu: true,
      auth: true,
      notBreadCrumb: true
    }
  },
  {
    path: '/users/manager/edit/:id',
    name: 'users.manager.edit',
    component: EditManager,
    meta: {
      title: '编辑',
      menuPath: '/users/staff',
      notMatchedMenu: true,
      auth: true,
      notBreadCrumb: true
    }
  },

  {
    path: '/users/staff/add',
    name: 'users.staff.add',
    component: EditStaff,
    meta: {
      title: '新增',
      menuPath: '/users/staff',
      notMatchedMenu: true,
      auth: true,
      notBreadCrumb: true
    }
  },
  {
    path: '/users/staff/edit/:id',
    name: 'users.staff.edit',
    component: EditStaff,
    meta: {
      title: '编辑',
      menuPath: '/users/staff',
      notMatchedMenu: true,
      auth: true,
      notBreadCrumb: true
    }
  },
  {
    path: '/users/staff/import',
    name: 'users.staff.import',
    component: ImportStaff,
    meta: {
      title: '导入',
      menuPath: '/users/staff',
      notMatchedMenu: true,
      auth: true,
      notBreadCrumb: true
    }
  }
]
